<template>
	<view>
		<view class="" style="padding: 24rpx;">
			<view style="border-bottom: 1rpx solid #E1E4E8;">
				<view class="subtitle">
					意向岗位
				</view>
				<input v-model="yx_gangwei" class="conMensge"  placeholder-style="color:#8F9294" placeholder="请输入名称"/>
			</view>
			
			<view @click="isCurrent_residence=true" style="border-bottom: 1rpx solid #E1E4E8;" >
				<view class="subtitle">
					意向城市
				</view>
				<view class="conMensge Mens">
					<view class="contemNems" style="width: 100%;">
						<view class="flex-line-height flex-height-between tab-anv-list-right">
							<view class="uni-input" v-if="yx_chengshi">{{yx_chengshi}}</view>
							<view v-else>请选择</view>
							<image class="img" :src="imgUrl+'/right.png'" mode=""></image>
						</view>
					</view>
				</view>
			</view>
			<!-- <view style="border-bottom: 1rpx solid #E1E4E8;" >
				<view class="subtitle">
					期望薪水
				</view>
				<view class="conMensge Mens">
					<picker class="contemNems" mode="multiSelector" style="width: 100%;" @change="xunshue" :range="xueli">
						<view class="flex-line-height flex-height-between tab-anv-list-right">
							<view class="uni-input" v-if="yx_xinshui">{{yx_xinshui}}</view>
							<view v-else>请选择</view>
							<image class="img" :src="imgUrl+'/right.png'" mode=""></image>
						</view>
					</picker>
				</view>
			</view> -->
			
			<view style="border-bottom: 1rpx solid #E1E4E8;" >
				<view class="subtitle">
					求职类型
				</view>
				<view class="conMensge Mens">
					<picker class="contemNems" style="width: 100%;" @change="quezholeix" :range="xueliScone">
						<view class="flex-line-height flex-height-between tab-anv-list-right">
							<view class="uni-input" v-if="yx_leixing">{{yx_leixing}}</view>
							<view v-else>请选择</view>
							<image class="img" :src="imgUrl+'/right.png'" mode=""></image>
						</view>
					</picker>
				</view>
			</view>
			
			
			<!-- <view style="border-bottom: 1rpx solid #E1E4E8;">
				<view class="subtitle">
					期望行业
				</view>
				<input  class="conMensge" v-model="yx_hangye" placeholder-style="color:#8F9294" placeholder="请填写"/>
			</view> -->
			<view style="border-bottom: 1rpx solid #E1E4E8;" >
				<view class="subtitle">
					到岗日期
				</view>
				<view class="conMensge Mens">
					<picker class="contemNems" style="width: 100%;" @change="daogariqi" :range="xuelime">
						<view class="flex-line-height flex-height-between tab-anv-list-right">
							<view class="uni-input" v-if="yx_daogangtime">{{yx_daogangtime}}</view>
							<view v-else>请选择</view>
							<image class="img" :src="imgUrl+'/right.png'" mode=""></image>
						</view>
					</picker>
				</view>
			</view>
			
			<cityPicker :column="2" :default-value="current_residence" :districtMesLIst="districtMesLIst" :mask-close-able="maskCloseAble" @confirm="confirm" @cancel="isCurrent_residence=false" :visible="isCurrent_residence"/>
		
		</view>
		<view class="JobDetails">
			<view class="btn" @click="showcertificateInformation">
				保存
			</view>
		</view>
	</view>
</template>

<script>
	import headerCome from "@/components/header-top.vue"
	import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker.vue'
	import {
		Request
	} from '@/utils/request.js'
	export default{
		components:{
			headerCome,
			cityPicker
		},
		data(){
			return {
				imgUrl:this.imgUrl,
				textareaMeValue:"",
				name:"",
				zhuanYe:"",
				endDate:'',
				endtimeMe:"",
				miaoshu:"",
				id:"",
				education:'',
				userinfo:{},
				date:'',
				type:1,
				xueliScone:['校招','社招','兼职','实习'],
				xuelime:['随时到岗','月内到岗','考虑机会','暂不考虑'],
				xueli:[
					['面议','1k', '2k', '3k', '4k', '5k', '6k', '7k', '8k', '9k', '10k', '11k', '12k', '13k', '14k', '15k', '16k', '17k', '18k', '19k', '20k', '21k', '22k', '23k', '24k', '25k', '26k', '27k', '28k', '29k', '30k', '31k', '32k', '33k', '34k', '35k', '36k', '37k', '38k', '39k', '40k', '41k', '42k', '43k', '44k', '45k', '46k', '47k', '48k', '49k', '50k', '51k', '52k', '53k', '54k', '55k', '56k', '57k', '58k', '59k', '60k', '61k', '62k', '63k', '64k', '65k', '66k', '67k', '68k', '69k', '70k', '71k', '72k', '73k', '74k', '75k', '76k', '77k', '78k', '79k', '80k', '81k', '82k', '83k', '84k', '85k', '86k', '87k', '88k', '89k', '90k', '91k', '92k', '93k', '94k', '95k', '96k', '97k', '98k', '99k','100k'],
					['面议','1k', '2k', '3k', '4k', '5k', '6k', '7k', '8k', '9k', '10k', '11k', '12k', '13k', '14k', '15k', '16k', '17k', '18k', '19k', '20k', '21k', '22k', '23k', '24k', '25k', '26k', '27k', '28k', '29k', '30k', '31k', '32k', '33k', '34k', '35k', '36k', '37k', '38k', '39k', '40k', '41k', '42k', '43k', '44k', '45k', '46k', '47k', '48k', '49k', '50k', '51k', '52k', '53k', '54k', '55k', '56k', '57k', '58k', '59k', '60k', '61k', '62k', '63k', '64k', '65k', '66k', '67k', '68k', '69k', '70k', '71k', '72k', '73k', '74k', '75k', '76k', '77k', '78k', '79k', '80k', '81k', '82k', '83k', '84k', '85k', '86k', '87k', '88k', '89k', '90k', '91k', '92k', '93k', '94k', '95k', '96k', '97k', '98k', '99k','100k'],
				],
				isCurrent_residence:false,
				isCategory_cn:false,
				category_cn:"",
				current_residence:[],
				yx_gangwei:'',
				yx_chengshi:"",
				yx_xinshui:'',
				yx_leixing:'',
				yx_hangye:'',
				yx_daogangtime:"",
			}
		},
		onLoad(e) {
			this.type=e.type||1
			this.id=e.webConmen
			this.userinfo=JSON.parse(uni.getStorageSync('userinfo'));
			this.userInfo();
		},
		methods:{
			confirm(e){
				this.yx_chengshi=e.provinceName+','+e.cityName;
				this.isCurrent_residence=false;
			},
			xunshue(e){
				this.yx_xinshui=this.xueli[0][e.detail.value[0]]+'-'+this.xueli[1][e.detail.value[1]]
			},
			quezholeix(e){
				this.yx_leixing=this.xueliScone[e.detail.value]
			},
			daogariqi(e){
				this.yx_daogangtime=this.xueliScone[e.detail.value]
			},
			userInfo(){
				   Request('/user/info').then((res)=>{
					    this.userinfo=res;
						this.yx_gangwei=this.userinfo.yx_gangwei;
						this.yx_chengshi=this.userinfo.yx_chengshi;
						this.yx_xinshui=this.userinfo.yx_xinshui;
						this.yx_leixing=this.userinfo.yx_leixing;
						this.yx_hangye=this.userinfo.yx_hangye;
						this.yx_daogangtime=this.userinfo.yx_daogangtime;
				   })
			},
			showcertificateInformation(){
				Request('user/curriculum_vitae/yiXiang',{
					user_id:this.userinfo.uid,
					yx_gangwei:this.yx_gangwei,
					yx_chengshi:this.yx_chengshi,
					yx_xinshui:this.yx_xinshui,
					yx_leixing:this.yx_leixing,
					yx_hangye:this.yx_hangye,
					yx_daogangtime:this.yx_daogangtime,
				},"POST").then((res)=>{
					
					uni.showToast({
						title:'成功',
						icon:'none'
					})
					
				})
			},
			// https://app.zizijy.com/api/user/curriculum_vitae/showcertificateInformation
			bindDateChange(e){
				this.date=e.detail.value;
			},
			bindDateChange1(e){
				this.endtimeMe=e.detail.value;
			},
			funCsiy(e){
				this.education=this.xueliScone[e.detail.value];
			},

		}
	}
</script>

<style>
	.title{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 40rpx;
		color: #0D0E0F;
		text-align: left;
		font-style: normal;
		padding-bottom: 40rpx;
		text-transform: none;
	}
	.contemNems{
		width: 40%;
	}
	.contemNems .img{
		width: 24rpx;
		height: 24rpx;
	}
	.conMensge.Mens {
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		font-size: 32rpx;
		color: #8F9294;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}
	.conMensge.Mens .uni-input{
		color: #0D0E0F;
	}
	.conMensge{
		padding: 24rpx 0;
	}
	.subtitle{
		margin-top: 24rpx;
		font-size: 28rpx;
	}
	.JobDetails{
		position: fixed;
		bottom: 0;
		left: 0;
		width: 750rpx;
		height: 158rpx;
		background: #FFFFFF;
		box-sizing: border-box;
		padding: 9rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}
	.JobDetails .btn{
		width: 702rpx;
		height: 80rpx;
		box-sizing: border-box;
		margin: 0 auto;
		background: #3B5EEC;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #FFFFFF;
		text-align: center;
		line-height: 80rpx;
		font-style: normal;
		text-transform: none;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
</style>